import pygame
import sys
import time
#Iniciar pygame
pygame.init()

#configurar la ventana
ancho = 500
alto = 400
ventana = pygame.display.set_mode((ancho, alto))
pygame.display.set_caption('Conster`s game')

#Definir colores
variable = 0
blanco = (255,255,255)
negro = (0,0,0)
rojo = (255,0,0)
verde = (0,255,0) 
azul = (0,0,255)
naranja = (255,100,0)
rosa = (255,100,100)
amarillo = (255,255,0)
oliva = (128,128,0) 
arcoiris = (blanco,negro,rojo,verde,naranja,rosa,amarillo,oliva)

#Pintar el fondo de la ventana
if variable == 0:
	for color in arcoiris:
		ventana.fill(color)
		pygame.display.update()
		time.sleep(0.2)

#Bucle de eventos
while True:
	for event in pygame.event.get():
		if event.type == pygame.QUIT:
			pygame.quit()
			sys.exit()
